Skip to content

fix(web-components): fix anchor positioning for RTL#36321

Merged
marchbox merged 5 commits into
microsoft:masterfrom
marchbox:users/machi/fix-anchor-rtl
Jun 19, 2026
Merged

fix(web-components): fix anchor positioning for RTL#36321
marchbox merged 5 commits into
microsoft:masterfrom
marchbox:users/machi/fix-anchor-rtl

Conversation

@marchbox

Copy link
Copy Markdown
Contributor

Previous Behavior

Anchor positioned elements are incorrectly positioned on the inline axis in RTL.

Screenshot 2026-06-17 at 15 12 49

New Behavior

Fixed the position and made it more robust by using inside/outside keywords.

Screenshot 2026-06-17 at 15 12 55

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@davatron5000 davatron5000 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. What's the browser support for inline/outside? Is that relatively new?

@marchbox

Copy link
Copy Markdown
Contributor Author

Changes look good. What's the browser support for inline/outside? Is that relatively new?

@davatron5000 It seems they have been supported alongside other keywords for anchor(), both inside and outside are in Anchor Positioning level 1, and the WPT timelines seem to align with general anchor positioning support timelines: https://wpt.fyi/results/css/css-anchor-position/anchor-inside-outside.html?label=master&label=experimental&aligned&q=anchor%20inside. So I’d say they are not new.

@marchbox marchbox merged commit 077efd9 into microsoft:master Jun 19, 2026
13 checks passed
@marchbox marchbox deleted the users/machi/fix-anchor-rtl branch June 19, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants